If a thread goes to sleep does it hold the lock